﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="products_details.aspx.cs" Inherits="WebSite.cn.products_details" %>
<%@ Register Src="head.ascx" TagName="head" TagPrefix="uc1" %>
<%@ Register Src="category.ascx" TagName="category" TagPrefix="uc2" %>
<%@ Register Src="bottom.ascx" TagName="bottom" TagPrefix="uc3" %>
<%@ Register src="browesProduct.ascx" tagname="browesProduct" tagprefix="uc4" %>
<%@ Register src="leftimgs.ascx" tagname="leftimgs" tagprefix="uc5" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title><%=WebSite.info.info1("", "shoptitle")%></title>
    <meta name="Description" content="<%=WebSite.info.info1("","shopcontent")%>" /> 
    <meta name="Keywords" content="<%=WebSite.info.info1("","shopkey")%>" />
    <link href="style.css" rel="stylesheet" type="text/css" />
    <link  rel="stylesheet" type="text/css" href="mall.css" />
    <link href="jqzoom.css" type="text/css" rel="stylesheet" />
    <script src="jquery.js" type="text/javascript"></script>
    <script language="JavaScript" src="../js/function.js"></script>
    <script language="javascript">
        function CheckFrm() {
            var obj = 'pronum';
            var objt = '8';
            var msg = '数量';
            var chks = chk(form1, obj, objt, msg)
            if (!chks) {
                return false;
            }
        }

        $(function () {
            $("#ibtnSubmit").click(function () {
                $.ajax({
                    type: "POST",
                    url: "/isAddToAccountHandler.ashx",
                    data: "pid=" + $("#pid").val() + "&price=" + $("#price").val() + "&pronum=" + $("#pronum").val() + "&content=" + $("#content").val() + "&score=" + $("#score").val(),
                    success: function (msg) {
                        if (msg == "1001") {
                            TB_show(null, "/cn/login.aspx?TB_iframe=true&height=370&width=640", false);

                        } else if (msg == "1002") {
                            TB_show(null, "/cn/exchange.aspx?TB_iframe=true&height=370&width=640", false);

                        }
                        else
                            window.location = "/cn/account.aspx";
                    }
                });
                return false;
            });

        });


    </script>
    <script type="text/javascript" src="yui-base.js"></script>
    <script type="text/javascript" src="tbra.js"></script>
    <script type="text/javascript" src="sellproperty.js"></script>
    <script language="javascript" type="text/javascript">
        var registeredImages = new Object();
        var numberToPreload = 6;
        var preloadCount = 0;

        function registerImage(id, image, html, caption) {
            registeredImages[id] = new Object();
            registeredImages[id].image = image;

            registeredImages[id].html = html;
            registeredImages[id].caption = caption;

            if (preloadCount < numberToPreload) {
                var imagePreloader = new Image();
                imagePreloader.src = image;
                preloadCount++;
            }
        }
        var allPreloaded = 0;
        var selectedImageID = "original_image";
        function displayImage(id, image) {
            if (id == selectedImageID) return;

            if (registeredImages[selectedImageID].ciuAnnoContainer) {
                registeredImages[selectedImageID].ciuAnnoContainer.hide();
            }
            selectedImageID = id;
            document.getElementById('proImg').src = image;
            document.getElementById('proImg').jqimg = image;

            for (elementID in registeredImages) {
                var imageThumbnail = document.getElementById(elementID);
                if (imageThumbnail != null) {
                    imageThumbnail.style.border = '1px solid #999999';
                }
                if (!allPreloaded) {
                    var imagePreloader = new Image();
                    imagePreloader.src = registeredImages[elementID].image;
                }
            }
            document.getElementById(id).style.border = '1px solid #990000';
            allPreloaded = 1;
            if (registeredImages[id].ciuAnnoContainer) {
                registeredImages[id].ciuAnnoContainer.show();
            }
        }
</script>
<script type="text/javascript">
    registerImage("original_image", "<%=images %>", "<img src=<%=images %> class=jqzoom width=<%=Convert.ToSingle(h3)%> height=<%=Convert.ToSingle(h4)%> jqimg=<%=images %>  />", "");
</script>


</head>
<body class="body">

<form id="form1" runat="server">
	<uc1:head ID="head_1" runat="server" />
        <center>
<div id="container">
   
   <table>
   <tr>
   <td style="width:260px; vertical-align:top; margin-left:50px;"> 
       <uc4:browesProduct ID="browesProduct1" runat="server" />
       <uc5:leftimgs ID="leftimg1" runat="server" />
   </td>
   <td style="vertical-align:top;">
       <div class="location"><%=SbNavigater.ToString()%></div>
		<div id="prozon">        
            <div id="prozonleft"> 
			    <h2><span  id="prodImageCell"><img src=<%=proimg %> class=jqzoom id=proImg  width=300px; jqimg="<%=proimg %>" /></span></h2>
				<div style="padding-bottom:8px; padding-top:8px; width:300px; text-align:center;"><a href="pic.aspx?pid=<%=Request.QueryString["pid"]%>" target="_blank"><img src="images/zoom.gif" border="0" /></a></div>
                <table width="100%" border="0" cellspacing="2" cellpadding="0" class="prozonleft_table">
                  <tr>
                    <%=pic %>
                    <%=imgs %> 
                    <td></td>
                  </tr>
                </table>
          </div>
          
          <input type="hidden" name="score" id="score"  value="<%=proscore %>" />
          <input name="pid" id="pid" type="hidden" value="<%=Request.QueryString["pid"] %>" />
            <div class="prozonright" >
				    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table04">			  
                      <tr><td colspan="3"> <h1><%=proname %></h1></td></tr>
                        <tr><td colspan="3" style="text-align:left;" >商品编号: <%=procode %></td></tr>
                          <tr><td colspan="3"> <h1>简介：</h1></td></tr>
                            <tr><td colspan="3"> <h1> <%= Instruction %></h1></td></tr>
                        <tr><td colspan="3" style="text-align:left;" >库存: <%=proku1%></td></tr>
                      <tr>
						<td colspan="3" style="text-align:left;" >数量
				        <input name="pronum" id="pronum" type="text" size="5" value="1" />
					    <span class="text_red">￥<%=proprice1 %></span>
					    <input type="hidden" name="price" id="price" value="<%=price %>" />
                        <input type="text" class="inputa" name="content" id="content" value="" readonly  style="display:none" />
					    </td>
                        </tr>
                         <tr><td></td><td colspan="2" style="text-align:left;" >
						  <asp:ImageButton ID="ibtnSubmit" runat="server" ImageUrl="images/pro_view_52.png" Width="137px" Height="39px" OnClientClick="return CheckFrm();" /></td>
					  </tr>     
				   </table>
          </div>

          	<iframe  name="conb" src="products_detfrm.aspx?pid=<%=Request.QueryString["pid"] %>" frameBorder=0  width="100%" scrolling="no" onload="this.height=conb.document.body.scrollHeight"></iframe>
            </div>
   
   </td>
   </tr>
   
   </table>
 

                </div>
          </center>
           <uc3:bottom ID="bottom_1" runat="server" />
		  </form>
</body>
</html>


<script src="jquery.jqzoom.js"></script>

<script type=text/javascript>
    //jQuery.noConflict();
    jQuery(document).ready(function () {
        jQuery("img.jqzoom").jqueryzoom({
            xzoom: 320,
            yzoom: 300,
            offset: 15,
            position: "right"
        });
    });
  </script>
